home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / disasm.zip / UASM-DOS.MAC < prev    next >
Text File  |  1988-06-03  |  6KB  |  113 lines

  1. ;57h  v1.05                       MS-DOS Interrupt 21 service codes
  2. ;
  3. ;.RADIX 16
  4. EXIT$       EQU   00    ; Terminate program
  5. CIN$WE      EQU   01    ; Return keyboard char. in AL /Wait & Echo
  6. COUT$       EQU   02    ; Display char. in DL
  7. AUXIN$W     EQU   03    ; Receive Serial char. in DL /Wait
  8. AUXOUT$W    EQU   04    ; Send Serial char. in DL  /Wait
  9. LSTOUT$     EQU   05    ; Send Parallel char. in DL
  10. CIO$N       EQU   06    ; Display char. in DL. If =FF then CIN$.  No ^C
  11. CIN$WN      EQU   07    ; Return keyboard char. in AL /Wait, No ^C
  12. CIN$W       EQU   08    ; Return keyboard char. in AL /Wait
  13. PRINT$      EQU   09    ; Display string @DX till terminator
  14. INSTR$      EQU   0A    ; Input keyboard string (DX -> size,cnt,buffer)
  15. KEY?$       EQU   0B    ; Test for keyboard input (AL: FF=yes; 00=no)
  16. CLEAR$KEYB  EQU   0C    ; Clear keyboard buffer (AL = srvc 1,6,7,8,A)
  17. RESET$D     EQU   0D    ; Reset diskette system (default A:)
  18. SELECT$D    EQU   0E    ; Select default drive DL (0=A, 1=B, etc.)
  19. OPEN$       EQU   0F    ; Open  file
  20. CLOSE$      EQU   10    ; Close file
  21. SEARCH$DIR  EQU   11    ; Search for first directory entry
  22. SEARCH$NEXT EQU   12    ; Search for next  directory entry
  23. DELETE$     EQU   13    ; Delete file
  24. READ$SEQ    EQU   14    ; Read  sequential file
  25. WRITE$SEQ   EQU   15    ; Write sequential file
  26. CREATE$     EQU   16    ; Create file & open
  27. RENAME$     EQU   17    ; Rename file
  28. DOS$18      EQU   18    ; (DOS internal reserved)
  29. DEF$DRIVE?  EQU   19    ; Return default drive AL (0=A, 1=B, etc.)
  30. SET$DTA     EQU   1A    ; Set Disk Transfer Address to DX
  31. DEF$FAT?    EQU   1B    ; Return Default drive FAT info. (AL,BX,CX,DX)
  32. FAT?$       EQU   1C    ; Get FAT info for drive DL (0=def, 1=A, etc.)
  33. DOS$1D      EQU   1D    ; (DOS internal reserved)
  34. DOS$1E      EQU   1E    ; (DOS internal reserved)
  35. DOS$1F      EQU   1F    ; (DOS internal reserved)
  36. DOS$20      EQU   20    ; (DOS internal reserved)
  37. READ$RND    EQU   21    ; Read random disk record
  38. WRITE$RND   EQU   22    ; Write random disk record
  39. SIZE?$      EQU   23    ; Return file size
  40. RANDOM$     EQU   24    ; Switch to Random file mode
  41. SET$INT     EQU   25    ; Set interrupt vector (AL=INT, DS:DX=VECTOR)
  42. BUILD$PS    EQU   26    ; Create new program segment (DX=SEGMENT)
  43. READ$BLOCK  EQU   27    ; Read random block (DX -> FCB, CX=COUNT, AL=ERR)
  44. WRITE$BLOCK EQU   28    ; Write random block(DX -> FCB, CX=CPUNT, AL=ERR)
  45. PARSE$      EQU   29    ; Parse Filespec (SI -> LINE, DI -> FCB, AL=CODE)
  46. DATE?$      EQU   2A    ; Return system Date in CX:DX
  47. SET$DATE    EQU   2B    ; Set system Date to CX:DX
  48. TIME?$      EQU   2C    ; Return system Time in CX:DX
  49. SET$TIME    EQU   2D    ; Set system Time to CX:DX
  50. SET$VER     EQU   2E    ; Set write verification to AL (0=off,1=on, DL=0)
  51. ;
  52. ;                       DOS 2.00 Service Codes
  53. ;
  54. DTA?$       EQU   2F    ;Return current DTA in BX
  55. VERSION?$   EQU   30    ;Return DOS Version number (i.e. AL=2, AH=00)
  56. STAY$RES    EQU   31    ;Terminate stay resident (AL=code, DX=size)
  57. DOS$31      EQU   32    ;DOS internal reserved
  58. CTRL$C      EQU   33    ;Get/set ^C checking (AL,DL)
  59. DOS$34      EQU   34    ;DOS internal reserved
  60. INTERRUPT?$ EQU   35    ;Return Interrupt vector AL in ES:BX
  61. FREE$SPACE? EQU   36    ;Return free space for disk DL (0=def, 1=A, etc.)
  62. DOS$37      EQU   37    ;DOS internal reserved
  63. NATION?$    EQU   38    ;Return country dependent info (DX -> table)
  64. MKDIR$      EQU   39    ;Make sub-directory (DX -> path)
  65. RMDIR$      EQU   3A    ;Remove sub-directory (DX -> path))
  66. CHDIR$      EQU   3B    ;Change directory (DX -> path)
  67. CREATE$PATH EQU   3C    ;Create file (DX -> path)
  68. OPEN$PATH   EQU   3D    ;Open file (DX -> path)
  69. CLOSE$H     EQU   3E    ;Close file (BX=handle)
  70. READ$BYT    EQU   3F    ;Read CX Bytes (BX=handle, DX -> buff)(AX)
  71. WRITE$BYT   EQU   40    ;Write CX Bytes (BX=handle, DX -> buff)(AX)
  72. DELETE$PATH EQU   41    ;Delete file (DX -> path)
  73. LSEEK$      EQU   42    ;Move read/write ptr (AL=code, BX=handle, CX:DX=off)
  74. FILE$ATTR   EQU   43    ;Read/Set file attributes (AL=code,CX=attr,DX -> path)
  75. IOCTL$      EQU   44    ;I/O Control for devices (AL=func, BX=handle)
  76. DUP$HANDLE  EQU   45    ;Duplicate file handle (BX=handle)(AX=new handle)
  77. FORCE$DUP   EQU   46    ;Force duplication(BX=handle, CX=handle 2)
  78. DIRECTORY?$ EQU   47    ;Return current directory of DL (0=def, 1=A)(SI -> buff)
  79. ALLOC$MEM   EQU   48    ;Allocate memory (BX= # par)(AX)
  80. FREE$MEM    EQU   49    ;Free allocated memory (ES=seg)
  81. SET$BLOCK   EQU   4A    ;Modify allocated memory blocks (ES=seg, BX=size)
  82. EXECECUTE$  EQU   4B    ;Execute program (AL=func, DX -> path, BX=parm)
  83. EXIT$2      EQU   4C    ;Terminate process (AL=code)
  84. WAIT$       EQU   4D    ;Retrieve return code of sub=process in AX
  85. FIND$DIR    EQU   4E    ;Find first directory entry (DX -> path, CX=ATTR)
  86. FIND$NEXT   EQU   4F    ;find next  directory entry (uses DTA)
  87. DOS$50      EQU   50    ;DOS internal reserved
  88. DOS$51      EQU   51    ;DOS internal reserved
  89. DOS$52      EQU   52    ;DOS internal reserved
  90. DOS$53      EQU   53    ;DOS internal reserved
  91. VERIFY?$    EQU   54    ;Return verification state in AL (0=off, 1=on)
  92. DOS$55      EQU   55    ;DOS internal reserved
  93. RENAME$PATH EQU   56    ;Rename file (DX -> path, DI -> new path)
  94. DATE$TIME   EQU   57    ;Get/Set file date and time in CX:DX (AL=0/1, BX=handle)
  95. ;END TABLE
  96. .RADIX        16
  97. IF1
  98. DOSCALL     MACRO       FUNC,PARM1
  99. .xcref
  100. F_C   =     FUNC
  101. IFNB        <PARM1>
  102. IF F_C EQ 2 OR (F_C GE 4 AND F_C LE 6) OR F_C EQ 0E OR F_C EQ 2E OR F_C EQ 33 OR F_C EQ 36 OR F_C EQ 47
  103.             MOV DL,PARM1
  104. ELSE
  105.             MOV DX,OFFSET PARM1
  106. ENDIF
  107. ENDIF
  108.             MOV AH,FUNC
  109.             INT 21
  110. .cref
  111.             ENDM
  112. ENDIF
  113.